<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	'enableAjaxValidation'=>false,
)); ?>

	<?php echo $form->errorSummary($model); ?>
        <?php echo $this->renderFlash(); ?>
    
        <table border="0" cellpadding="0" cellspacing="0"  id="id-form">
            <tr>
                <th valign="top"><?php echo $form->labelEx($model,'username'); ?></th>
                <td><?php echo $form->textField($model,'username',array('size'=>60,'maxlength'=>255, 'class' => 'inp-form')); ?></td>
                <td></td>
            </tr>                                
            <tr>
                <th valign="top"><?php echo $form->labelEx($model,'password'); ?></th>
                <td><?php echo $form->PasswordField($model,'password',array('size'=>60,'maxlength'=>255, 'class' => 'inp-form', 'value' => '')); ?></td>
                <td></td>
            </tr>
            <?php if ($model->isNewRecord): ?>
            <tr>
                <th valign="top"><?php echo CHtml::label('Repassword','Repassword'); ?></th>
                <td><input type="password" name="User[repassword]" id="User_repassword" class="inp-form" /></td>
                <td></td>
            </tr>  
            <?php else: ?>
            <tr>
                <th valign="top"><?php echo CHtml::label('New password','Newpassword'); ?></th>
                <td><input type="password" name="User[newpassword]" id="User_newpassword" class="inp-form" /></td>
                <td></td>
            </tr>
            <tr>
                <th valign="top"><?php echo CHtml::label('Retype new password','RetypeNewpassword'); ?></th>
                <td><input type="password" name="User[renewpassword]" id="User_renewpassword" class="inp-form" /></td>
                <td></td>
            </tr>
            <?php endif; ?>
            <tr>
                <th>&nbsp;</th>
                <td valign="top">
                    <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('class' => 'form-submit')); ?>
                </td>
                <td></td>
            </tr>
        </table>

<?php $this->endWidget(); ?>

</div><!-- form -->